home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2165 < prev    next >
Encoding:
Text File  |  1996-08-05  |  603 b   |  28 lines

  1. Path: service.britgas.co.uk!usenet
  2. From: andy.crutchlow@service.britgas.co.uk (Andy Crutchlow)
  3. Newsgroups: comp.lang.c
  4. Subject: Help: floating point/use of floor
  5. Date: 19 Jan 1996 16:28:34 GMT
  6. Organization: Your Organization
  7. Message-ID: <4dogri$fta@gate.service.britgas.co.uk>
  8. NNTP-Posting-Host: 93.224.235.131
  9. X-Newsreader: WinVN 0.92.6+
  10.  
  11. Can anyone help.
  12.  
  13. Make the following display 75.99
  14. main()
  15. {
  16. int i;
  17. float f;
  18. i = 7599;
  19. f = i / 100.00;
  20. printf("%f\n",f);
  21. }
  22.  
  23. I believe the correct answer involves using function floor but I can't
  24. remember how.
  25.  
  26. Thanks.
  27. e-mail:- andy.crutchlow@service.britgas.co.uk
  28.